package biz.datalk.industrialland.common.exception;


import biz.datalk.industrialland.common.result.UnifyResultCode;

/**
 * 应用异常
 *
 * @author tarofang@163.com
 * @date         2016年8月18日
 */
public class ApplicationException extends RuntimeException {
	
	private static final long serialVersionUID = -2678203134198782909L;
	
	public static final String MESSAGE = "应用异常";
	
	protected String code = UnifyResultCode.APPLICATION_ERROR;
	
	public ApplicationException() {
		super(MESSAGE);
	}
	
	public ApplicationException(String message) {
		super(message);
	}
	
	public ApplicationException(String code, String message) {
		super(message);
		this.code = code;
	}
	
	public ApplicationException(String message, Throwable cause) {
		super(message, cause);
	}
	
	public ApplicationException(String code, String message, Throwable cause) {
		super(message, cause);
		this.code = code;
	}
	
	public ApplicationException(Throwable cause) {
		super(cause);
	}
	
	public ApplicationException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
		super(message, cause, enableSuppression, writableStackTrace);
	}
	
	public ApplicationException(String message, Throwable cause, String code) {
		super(message, cause);
		this.code = code;
	}
	
	public ApplicationException(Throwable cause, String code) {
		super(cause);
		this.code = code;
	}
	
	public ApplicationException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, String code) {
		super(message, cause, enableSuppression, writableStackTrace);
		this.code = code;
	}
	
	public String getCode() {
		return code;
	}
	
	public void setCode(String code) {
		this.code = code;
	}
}
